package top.infopub.mgr.mkt.service;

import java.util.List;

import com.github.pagehelper.Page;

import top.infopub.generic.GenericService;
import top.infopub.mgr.common.vo.RspVo;
import top.infopub.mgr.mkt.vo.BaseLineVo;
import top.infopub.model.mkt.BaseLine;
import top.infopub.model.mkt.StandardSub;

import javax.servlet.http.HttpServletRequest;


public interface BaseLineService extends GenericService<BaseLine, String> {

    /**
     * 根据条件查询底线记录
     * @param page
     * @param baseLineVo
     * @return
     * @see
     */
    Page<BaseLineVo> selectPageByDomainWhere(Page<BaseLineVo> page, BaseLineVo baseLineVo);


    /**
     * 新增底线标准
     * @param baseLine 底线标准
     * @see
     */
    void addBaseLine(BaseLine baseLine);

    /**
     * 编辑底线标准
     * @param baseLine
     */
    void editBaseLine(BaseLine baseLine);

    /**
     * 根据id查询底线标准详情
     * @param id 主键id
     * @return
     * @see
     */
    BaseLine selectById(String id);

    List<BaseLineVo>  selectBySgCityId(String sgCityId, Integer type, Object o);

    /**
     *
     * @author andySayh
     * @Title: updateByFlagKey
     * @Description: 标准启用/禁用
     * @param flag
     * @param id
     * @return void
     * @throws
     */
    void updateByFlagKey(String flag, String id);

    /**
     * 判断单位是否已存在
     * @author andySayh
     * @Title: checkSgCityName
     * @Description: TODO
     * @param sgCityName
     * @param id
     * @return
     * @return int
     * @throws
     */
    int checkSgCityName(String sgCityName, String id);


    /**
     * 判断当前项目是否满足底线标准
     * @param proCode
     * @return
     */
    List<BaseLineVo> checkIsSatisfy(String proCode);

    List<StandardSub> getStandard(String address);

    RspVo edit(HttpServletRequest request,BaseLine baseLine);
}
